package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Travel;
import cn.wolfcode.trip.base.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TravelMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Travel record);

    Travel selectByPrimaryKey(Long id);

    List<Travel> selectAll();

    int updateByPrimaryKey(Travel record);

    List<Travel> getList(QueryObject qo);

    void changeState(Travel travel);

    List<Travel> selectTravelByStrategyId(QueryObject qo);

    void deleteRelation(Long travelId);
    void insertRelation(@Param("strategyId") Long strategyId, @Param("travelId") Long travelId);

    List<Travel> selectTraveByMid();

    List<Travel> getTravels(QueryObject qo);

    int selectCount(Long authorId);

    List<Travel> selectByKeyword(QueryObject qo);
}